package oop.ex3.usercommands;

import java.util.LinkedList;
import java.util.TreeSet;

import oop.ex3.filemanager.FileManager;
import oop.ex3.sharedclasses.IPaddress;

public class DirServers extends UserMessage{

	public static final String COMMAND="DIRSERVERS";
	
	public DirServers(FileManager fileManager) {
		super(fileManager);
	}

	/**
	 * Runs the DirServers UserMessage.
	 * prints all the FileManager's nameServers,
	 * each in a new line.
	 */
	public boolean run(){
		LinkedList<IPaddress> nameServerList = this._fileManager.getNameServerList();
		for (IPaddress nameServer : nameServerList){
			System.out.println(nameServer);
		}
		return SUCCESS;
	}
}
